package com.zp.self.module.date.controller;

import com.zp.self.module.date.entity.Person;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

/**
 * @author By ZengPeng
 * @Description 程序处理时区
 * @date in  2021/1/11 11:01
 * @Modified By
 */
@RestController
@RequestMapping("/date")
public class DateController {

    @RequestMapping(value = "/get",method = RequestMethod.GET)
    public Object hi(String name){
        return new Person().setAge(1).setBirthday(new Date()).setName(name);
    }


    @RequestMapping(value = "/post",method = RequestMethod.POST)
    @ResponseBody
    public Object post(@RequestBody Person persion) {
        System.out.println(persion.getBirthday());
        return persion;
    }

}
